﻿using EMall.Domain;
using Microsoft.EntityFrameworkCore;

namespace EMall.ProductService.Brands
{
    public class BrandRepository : ProductServiceRepository<Brand, int>, IBrandRepository
    {
        public BrandRepository(ProductServiceDbContext dbContext) : base(dbContext)
        {
        }
        public async Task<Brand?> GetByNameAsync(string name) => await GetQueryable().FirstOrDefaultAsync(o => o.Name.Equals(name));
    }
}
